﻿using ServiceCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace Entity
{
    public class wx_message_base
    {
        /// <summary>
        /// 储存消息ID
        /// </summary>
        public string message_id { get; set; }
        /// <summary>
        /// 消息类型
        /// </summary>
        public message_type message_type { get; set; }
        /// <summary>
        /// 关键参数
        /// </summary>
        public string key_parameter { get; set; }
        /// <summary>
        /// json实体  
        /// reply_text_msg 文本
        /// reply_image_msg 图片
        /// reply_voice_msg 语音
        /// reply_video_msg 视频
        /// reply_news_msg 图文
        /// </summary>
        public string json_content { get; set; }
        /// <summary>
        ///  添加时间
        /// </summary>
        public DateTime addtime { get; set; }
        /// <summary>
        /// 对应微信公众号
        /// </summary>
        public string mp_app_id { get; set; }
        /// <summary>
        /// 是否可用
        /// </summary>
        public bool is_use { get; set; }
        /// <summary>
        /// 数据类型
        /// </summary>
        public string msg_type { get; set; }
    }
    public enum message_type
    {
        关注回复 = 0,
        关键词回复 = 1,
        菜单click = 2
    }


    #region 请求参数
    /// <summary>
    ///  关注回复参数
    /// </summary>
    public class set_follow_return_params
    {
        /// <summary>
        /// 消息类型
        /// </summary>
        public string msg_type { get; set; }
        /// <summary>
        /// 回复的消息json实体
        /// </summary>
        public object json_content { get; set; }
        /// <summary>
        /// 是否可用
        /// </summary>
        public bool is_use { get; set; } = false;
    }
    /// <summary>
    /// 设置关键词回复
    /// </summary>
    public class set_key_return_params : set_follow_return_params
    {
        /// <summary>
        /// 用于检测的关键词
        /// </summary>
        public string key_parameter { get; set; }
    }

    public class set_click_return_params : set_follow_return_params
    {
        public int? btn_index { get; set; }

        public int? sub_button_index { get; set; }
    }


    public class get_wx_message_pagelist_params : Base_List_Params
    {
        public message_type? message_type { get; set; }

        public string msg_type { get; set; }

        public bool? is_use { get; set; }
    }
    #endregion
}
